<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        div{
            width: 1160px;
            padding-top: 10px;
            padding-left: 10px;
            height: 320px;
            background-color: rgb(244,245,244);
        }
        #img{
            vertical-align: middle;
        }
        #list{
            display: inline-block;
            list-style: none;
            vertical-align: middle;
            margin-top: 0px;
            margin-bottom: 0px;
            padding-left: 10px;
        }
        .item{
            line-height: 54px;
            width: 400px;
            margin-bottom: 5px;
            padding-left: 30px;
            background-color: #e68c8b;
        }
    </style>
</head>
<body>
    <div>
        <img id="img" src="img/q1.jpg" alt="" width="700px" height="305px">
        <ul id="list">
            <li class="item">奔腾品牌旗舰店 买买买</li>
            <li class="item">爱乐士品牌旗舰店 买买买</li>
            <li class="item">路易13牌旗舰店 买买买</li>
            <li class="item">宝马品牌旗舰店 买买买</li>
            <li class="item">ck品牌旗舰店 买买买</li>
        </ul>
    </div>
    <script>
        var img = document.getElementById('img');
        var list = document.getElementById('list');
        var item = document.getElementsByClassName('item');
        for(var i=0;i<item.length;i++){
            item[i].index = i;
            item[i].onmouseover = function(){
                for(var j=0;j<item.length;j++){
                    item[j].style.backgroundColor = '#e68c8b';
                    item[j].style.backgroundImage = 'url()';
                }                
                item[this.index].style.backgroundImage = 'url(img/t10.jpg)';
                item[this.index].style.backgroundColor = 'white';
                item[this.index].style.backgroundRepeat= 'no-repeat';
                img.src = 'img/q' + parseInt(this.index+1) + '.jpg';
            }
        }

        // for(let i=0;i<item.length;i++){
        //     item[i].onmouseover = function(){
        //         item[i].style.backgroundImage = 'url(img/t10.jpg)';
        //         item[i].style.backgroundColor = 'white';
        //         item[i].style.backgroundRepeat= 'no-repeat';
        //         img.src = 'img/q' + parseInt(i+1) + '.jpg';
        //     }
        //     item[i].onmouseout = function(){
        //         item[i].style.backgroundColor = '#e68c8b';
        //         item[i].style.backgroundImage = 'url()';
        //     }
        // }
    </script>
</body>
</html>